You should also attempt to minimize information loss by choosing an encoding that is as rich as the encoding the database uses for data storage. For example, if you choose a 7 bit ASCII encoding for communication when the database stores data in Unicode, the Unicode-encoded character `Á' loses its accent during conversion.
To change an adaptor's character encoding from the default, add a databaseEncoding entry to the adaptor's connection dictionary specifying the encoding. The adaptors expect the databaseEncoding entry to contain the localized name of an encoding. To get the localized name of an encoding, use the NSStringReference static method localizedNameOfStringEncoding (in Objective-C, NSString's class method localizedNameOfStringEncoding:).
If you need to use an encoding other than the default, Enterprise Objects Framework adaptors define adaptor-specific connection keys for setting the encoding. For example, the Sybase adaptor has the key LC_ALL and the Oracle adaptor has the key NLS_LANG. To set the encoding the database should use to send data to and receive data from your application, add an entry to the adaptor's connection dictionary for the adaptor-specific key. Check your database server's documentation for the available character encodings.
Note: The databaseEncoding and the adaptor-specific encoding entries in a connection dictionary must specify the same encoding. However, the string that identifies the encoding may differ. For example, to tell a Sybase database to use the ISO Latin 1 encoding, you set the LC_ALL connection key to "iso-1" and the databaseEncoding connection key to "ISO Latin-1" .
Table of Contents
Next Section